home *** CD-ROM | disk | FTP | other *** search
-
-
-
- MKMF User Commands MKMF
-
-
-
- _________________________________________________________________
-
- NNAAMMEE
- mkmf - generate Makefiles automatically
-
- SSYYNNOOPPSSIISS
- mmkkmmff [--ff _m_a_k_e_f_i_l_e] [--xx] [--mm _m_a_c_h_i_n_e_T_y_p_e] [--mm_m_a_c_h_i_n_e_T_y_p_e]
-
- OOPPTTIIOONNSS
- --ff _m_a_k_e_f_i_l_e
- Generate a file named _m_a_k_e_f_i_l_e instead of MMaakkeeffiillee.
- Also use _m_a_k_e_f_i_l_e.pprroottoo, _m_a_k_e_f_i_l_e.eedd, and _m_a_k_e_f_i_l_e.eexx
- instead of MMaakkeeffiillee..pprroottoo etc.
-
- --xx Turns on echo-ing so that all the commands in the mmkkmmff
- scripts are printed on the terminal. This is useful
- primarily for debugging mmkkmmff scripts.
-
- --mm _m_a_c_h_i_n_e_T_y_p_e or --mm_m_a_c_h_i_n_e_T_y_p_e
- Work only on subdirectory for _m_a_c_h_i_n_e_T_y_p_e. Multiple --mm
- flags can be used to run mmkkmmff on multiple machine
- types.
-
- _________________________________________________________________
-
-
- IINNTTRROODDUUCCTTIIOONN
- MMkkmmff generates a MMaakkeeffiillee for the current working directory.
- It also creates additional make-related files in machine-
- dependent subdirectories of the current directory. MMkkmmff can
- generate MMaakkeeffiillees for a variety of directories, including
- those holding programs, libraries, header libraries, kernel
- sources, and other things. mmkkmmff manages all of the direc-
- tories holding Sprite system code. In normal use, all you
- should have to do is type "mkmf"; mmkkmmff will generate a
- suitable MMaakkeeffiillee based on the directory's full path name
- and the files and subdirectories in it. After that you can
- invoke ppmmaakkee to recompile in the directory, install, and so
- on. The files produced by mmkkmmff will only work with ppmmaakkee,
- not with the original UNIX version of mmaakkee (but in Sprite
- mmaakkee is a symbolic link to ppmmaakkee). This man page assumes
- that you are familiar with ppmmaakkee; if not, you should read
- the ppmmaakkee tutorial.
-
- Warning: there is also a UNIX program called mmkkmmff;
- although its general goal is the same as this program's, its
- mechanisms are very different.
-
- Normally, you should re-run mmkkmmff in a directory whenever you
- add or delete source files. When mmkkmmff runs, it assumes that
- all of the source files (those with extensions .c, .h, .y,
- etc.) are to be used to create a single program or library,
- and it generates MMaakkeeffiillee accordingly. If there are source
- files that don't pertain to the thing being created (e.g.
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 1
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- test programs), put them in a subdirectory where mmkkmmff won't
- see them.
-
-
- MMAAKKEEFFIILLEE SSTTRRUUCCTTUURREE
- The makefile structure that mmkkmmff generates is a bit compli-
- cated, but it's also powerful and flexible. Among other
- things, it supports compilation for multiple target machines
- from a single set of source files, and it makes it easy to
- make a global change in the way all directories of a partic-
- ular type are made (e.g. all command programs, or all
- libraries). For most directories there are five kinds of
- ppmmaakkee-related files:
-
- MMaakkeeffiillee
- This is the main file generated by mmkkmmff, but it is
- short and does relatively little. It sets up several
- ppmmaakkee variables that give the name of the program, a
- list of target machines for which the program can be
- compiled, default flags for C compilation, and so on.
- Then MMaakkeeffiillee includes the other files described below,
- which contain most of the useful ppmmaakkee-related informa-
- tion. MMaakkeeffiillee contains information that may be dif-
- ferent for this directory than for other directories of
- the same type (for example, each library has a dif-
- ferent name), but it only contains information that is
- independent of the particular target machine being com-
- piled for.
-
- **..mmdd//mmdd..mmkk
- There is one subdirectory for each target machine that
- this program or library or module can be compiled to
- run on. These are called _m_a_c_h_i_n_e-_d_e_p_e_n_d_e_n_t _s_u_b_d_i_r_e_c_-
- _t_o_r_i_e_s and have names _x..mmdd wwhheerree _x is the type of the
- target machine, e.g., ssuunn22..mmdd or ssuunn33..mmdd. A machine-
- dependent subdirectory holds all information that is
- different for that particular machine than for other
- machines. This includes the object files compiled for
- that machine, plus any machine-dependent sources. Most
- user programs don't have machine-dependent sources, but
- many of the kernel modules and libraries do. In each
- machine-dependent subdirectory there is a file mmdd..mmkk,
- generated automatically by mmkkmmff. MMdd..mmkk is included by
- MMaakkeeffiillee and creates variables like SSRRCCSS,, OOBBJJSS, and
- HHDDRRSS. These describe the files needed to recompile for
- that target machine, including both the machine-
- independent files in the parent directory (the one con-
- taining MMaakkeeffiillee) and the machine-dependent files in
- the _x..mmdd subdirectory.
-
- **..mmdd//ddeeppeennddeenncciieess..mmkk
- There is one of these files in each machine-dependent
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 2
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- subdirectory. DDeeppeennddeenncciieess..mmkk lists the header files
- used directly or indirectly by each source file. It is
- included by MMaakkeeffiillee so that ppmmaakkee will do the
- appropriate recompilations when headers change.
- DDeeppeennddeenncciieess..mmkk files are generated automatically by
- mmaakkeeddeeppeenndd. The command ``pmake depend'' will run mmaakk--
- eeddeeppeenndd to regenerate ddeeppeennddeenncciieess..mmkk. MMkkmmff also
- issues a ``pmake depend'' command whenever it runs.
-
- _s_y_s_m_a_k_e_f_i_l_e
- There only a few different kinds of source directories
- in Sprite: commands, libraries, kernel modules, etc
- (see ``HOW MKMF WORKS'' below). For each of these
- types of directories, there is one file of ppmmaakkee com-
- mands that contains all of the ``real stuff'' that con-
- trols recompilation, installing, etc. MMaakkeeffiillee sets
- the variable SSYYSSMMAAKKEEFFIILLEE to hold the name of this file,
- and under normal conditions MMaakkeeffiillee will include the
- sysmakefile whenever ppmmaakkee is invoked (see ``PERSONALI-
- ZATION'' below for exceptions to this rule). The
- sysmakefiles use the variables and dependencies set up
- by MMaakkeeffiillee, mmdd..mmkk, and ddeeppeennddeenncciieess..mmkk. The
- sysmakefiles are all stored in //sspprriittee//lliibb//ppmmaakkee.
-
- _u_t_i_l_i_t_y _m_a_k_e_f_i_l_e_s
- There is a collection of small makefiles in the direc-
- tory //sspprriittee//lliibb//ppmmaakkee, which are include by
- sysmakefiles for operations that are shared by many
- sysmakefiles.
-
-
- SSTTAANNDDAARRDD TTAARRGGEETTSS
- Several standard ppmmaakkee targets are available in any direc-
- tory managed by mmkkmmff:
-
- _d_e_f_a_u_l_t If you type ppmmaakkee with no arguments, then the
- default target just recompiles the program or
- library in this directory. Compiled files are
- placed in the .mmdd subdirectory for the current
- target machine (see below for more information
- on target machines).
-
- cclleeaann Remove any files that can be regenerated
- automatically by ppmmaakkee. This frees up space
- on disk and forces a complete recompilation
- the next time ppmmaakkee is invoked.
-
- ttiiddyy Remove any files that can be regenerated
- automatically by ppmmaakkee, except the executable
- produced for a command. This frees up space
- on disk and forces a complete recompilation
- the next time ppmmaakkee is invoked, but it leaves
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 3
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- around the unstripped executable for debugging
- purposes.
-
- ddeebbuugg Valid for libraries only. Generate a version
- of the library with debugging symbols. The
- default for libraries is to compile without
- debugging information
-
- ddeeppeenndd Regenerate the ddeeppeennddeenncciieess..mmkk file in the ..mmdd
- subdirectory for the current target machine.
- This target should be re-made when source
- files are created or deleted, or when header
- file usage has changed.
-
- iinnssttaallll Recompiles the information in this directory
- and installs it in its official system loca-
- tion, so that it can be used by other people.
- For commands, this means copying the binary of
- the command to the appropriate system command
- directory and saving the old installed version
- of the command in a backup directory. For
- libraries, it means copying the library's .aa
- file to the relevant library directory, and
- also installing the library's header files and
- lint library.
-
- iinnssttaallllddeebbuugg Valid for libraries only. Install the version
- of the library with debugging symbols.
-
- iinnssttaallllhhddrrss This target is only available in library and
- header directories. It installs the public
- header files for the module in the appropriate
- system header directory. MMkkmmff decides which
- header files are public and which are private
- based on the files' names. In order to be
- public, the first letters of a ..hh file must be
- the same as the name of the directory, and the
- string IInntt must not appear in the file's name.
- Thus, in the library ssxx the file ssxx..hh is pub-
- lic, whereas the files ssxxIInntt..hh and ffoooo..hh are
- treated as private.
-
- iinnssttaalllllliinntt This target is only available in library
- directories. It generates a lint library file
- for the contents of this module and installs
- it in the system lint library.
-
- iinnssttaallllpprrooffiillee
- This target is only available in library
- directories. It installs the version of the
- library that has been compiled for profiling.
-
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 4
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- lliinntt Run lint on this program/library and the other
- programs and libraries it uses. Output is
- placed in the file lliinntt in the ..mmdd subdirec-
- tory for the current machine.
-
- mmkkmmff Run mmkkmmff to regenerate the Makefile for this
- directory. This target is particularly use-
- ful in top-level directories with many chil-
- dren, since it will run mmkkmmff recursively in
- each of the subdirectories.
-
- nneewwttmm Set things up to compile for a new type of
- target machine (which must be specified expli-
- citly using the TTMM variable). This includes
- creating a ..TTMM subdirectory and re-running
- mmkkmmff.
-
- pprrooffiillee Compile a profiled version of the command or
- library.
-
- ttaaggss Generate a ttaaggss file in this directory that
- describes all the information in all of the
- source files for this program or library,
- including both the machine-independent sources
- and the machine-dependent sources for all tar-
- get machines.
-
-
- TTAARRGGEETT MMAACCHHIINNEESS
- The above targets all apply to the ``current target
- machine'', which is the value of the TTMM variable in
- MMaakkeeffiillee. If you wish to compile for a different target
- machine, you can specify an explicit value of the TTMM vari-
- able on the ppmmaakkee command line, such as
-
- ppmmaakkee TTMM==ssuunn22
-
- or
-
- ppmmaakkee iinnssttaallll TTMM==ssuunn33
-
- There are also four other ways you can specify target
- machines as part of ppmmaakkee targets:
-
- _t_m If you specify a target machine as a ppmmaakkee
- target, such as ppmmaakkee ssuunn22, then the default
- target will be made for that particular
- machine
-
- aallll The aallll target causes the default target to be
- made for all target machines currently known
- for this directory.
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 5
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- _t_a_r_g_e_t _t_m If you add a machine name as a suffix to one
- of the standard targets, e.g., ppmmaakkee
- iinnssttaallllssuunn22 or ppmmaakkee lliinnttssuunn33, the result is
- equivalent to specifying the TTMM variable: the
- target is re-made for the given machine
- instead of the default machine.
-
- _t_a_r_g_e_taallll If you add the aallll suffix to a target, e.g.
- ppmmaakkee iinnssttaallllaallll, then _t_a_r_g_e_t will be re-made
- for all known target machines.
-
- The list of known target machines is given by the MMAACCHHIINNEESS
- variable specified in MMaakkeeffiillee. This variable is set from
- the names of ..mmdd subdirectories at the time mmkkmmff is run. To
- add a new target machine, ffoooo for example, create a sub-
- directory ffoooo..mmdd and then re-run mmkkmmff.
-
-
- AADDDDIITTIIOONNAALL PPMMAAKKEE VVAARRIIAABBLLEESS
- There are a few variable names that mmkkmmff reserves
- exclusively for your use, as a way of controlling various
- things. The makefiles generated by mmkkmmff will use these
- variables, if you set them on a ppmmaakkee command line:
-
- NNOOBBAACCKKUUPP Normally, when a command is installed the pre-
- vious version of the command is saved in a
- backup directory. If you set the NNOOBBAACCKKUUPP
- variable to any value, then no backup copy
- will be saved.
-
- BBAACCKKUUPPAAGGEE If NOBACKUP is not defined, then normally, a
- backup overwrites a previous backup only if
- the file being backed up is sufficiently old
- to be deemed stable (run uuppddaattee --hheellpp for
- information about the default age). BACKU-
- PAGE, if set, overrides the default age used
- for this purpose.
-
- XXAAFFLLAAGGSS Extra flags that will be used in all assembler
- invocations, in addition to the standard ones
- set up by the makefiles.
-
- XXCCFFLLAAGGSS Extra flags that will be used in all C compi-
- lations, in addition to the standard ones set
- up by the makefiles.
-
- In addition to the variables above, you can also override
- other variables defined in the makefiles. See "LOCAL.MK
- VARIABLES" below.
-
-
-
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 6
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- PPEERRSSOONNAALLIIZZAATTIIOONN
- The makefiles generated by mmkkmmff won't always do the right
- thing without additional program-specific information. For
- example, a particular program may need to use additional
- libraries besides the C library, or it may need particular
- compiler switches, or certain files may need special pro-
- cessing during compilation. There are six ways to personal-
- ize the information in a particular directory, each of which
- is invoked by creating a file with a particular name:
-
- kkeerrnneell..mmkk This file can be used to create personalized
- Sprite kernels. MMaakkeeffiillees in kernel module
- directories will check for the existence of a
- kkeerrnneell..mmkk file in your home directory. If the
- file exists it will be included prior to
- including any other files. The kkeerrnneell..mmkk is
- intended modify the behavior of a sysmakefile
- for a kernel module, not to replace it. In
- this respect a kkeerrnneell..mmkk file is different
- from a llooccaall..mmkk file.
-
- llooccaall..mmkk This is the simplest and most common form of
- personalization. MMaakkeeffiillee checks for the
- existence of llooccaall..mmkk; if it exists, then
- MMaakkeeffiillee includes it instead of the
- sysmakefile. Usually llooccaall..mmkk contains a few
- ppmmaakkee commands, then it includes the
- sysmakefile (whose name is passed in the vari-
- able SYSMAKEFILE), then it issues a few more
- ppmmaakkee commands. See "LOCAL.MK EXAMPLES"
- below.
-
- MMaakkeeffiillee..sseedd If MMaakkeeffiillee..sseedd exists when mmkkmmff runs, then
- mmkkmmff uses it as a Sed script to modify
- MMaakkeeffiillee. If the --ff switch has been used to
- specify a different makefile, say ffoooo, then
- mmkkmmff looks for ffoooo..sseedd. In particular, you
- can place a file mmdd..mmkk..sseedd in a machine-
- dependent subdirectory in order to modify the
- mmdd..mmkk file. Most things that you can do with
- a MMaakkeeffiillee..sseedd script you can also do in a
- llooccaall..mmkk file; this feature is mostly a left-
- over from ancient times when the llooccaall..mmkk
- facility didn't exist.
-
- MMaakkeeffiillee..eexx Similar to MMaakkeeffiillee..sseedd, except mmkkmmff uses it
- as an Ex script to modify MMaakkeeffiillee.
-
- MMaakkeeffiillee..pprroottoo
- If this file exists when mmkkmmff runs, then mmkkmmff
- uses it as a prototype makefile instead of one
- from the mmkkmmff library. See ``HOW MKMF WORKS''
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 7
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- below for what this means.
-
- mmkkmmff..llooccaall If this file exists, it must be a shell
- script. It will be executed by mmkkmmff in place
- of the standard type-specific mmkkmmff script that
- would normally be executed to generate
- MMaakkeeffiillee. See ``HOW MKMF WORKS'' below for
- more information on this.
-
- Finally, there is one other, even more radical, way for you
- to control what's in your MMaakkeeffiillee, and that is to create
- your own MMaakkeeffiillee from scratch and make sure it contains a
- line ``# No mkmf''. MMkkmmff will refuse to do anything if it
- finds a MMaakkeeffiillee with such a comment in it; you can then put
- anything you like in the MMaakkeeffiillee. It's probably a bad idea
- (and unnecessary) for you ever to generate a Makefile by
- hand in any Sprite system directory, but if you do, be sure
- it has a ``# No mkmf'' line: it is common practice to run
- mmkkmmff indiscriminately on system directories, and this will
- make sure your MMaakkeeffiillee doesn't accidentally get overwritten
- (actually, mmkkmmff won't overwrite a makefile unless it finds a
- line ``# Allow mkmf'' in it, but if it doesn't find a ``# No
- mkmf'' line then it will ask for permission to overwrite
- it).
-
-
- HHOOWW MMKKMMFF WWOORRKKSS
- The mmkkmmff program runs as a two-stage shell script. The
- top-level script is the mmkkmmff program itself. It does things
- that are common to all uses of mmkkmmff, such as checking for
- the ``# Allow mkmf'' line in your MMaakkeeffiillee and running ppmmaakkee
- ddeeppeennddaallll. There are several second-level shell scripts,
- called _t_y_p_e-_s_p_e_c_i_f_i_c scripts. Each one of these scripts is
- set up to handle a particular kind of directory, such as
- those for libraries, programs, or directories containing
- only header files. The type-specific scripts correspond to
- the sysmakefiles: for each type, there is an mmkkmmff script to
- generate its MMaakkeeffiillee, a prototype makefile that the script
- fills in, and a sysmakefile in //sspprriittee//lliibb//ppmmaakkee that does
- most of the real work for making things of that type. The
- type-specific scripts and prototype makefiles are all stored
- in //sspprriittee//lliibb//mmkkmmff with names like mmkkmmff..lliibbrraarryy and
- MMaakkeeffiillee..lliibbrraarryy.
-
- MMkkmmff uses the file //sspprriittee//lliibb//mmkkmmff//mmkkmmff..mmaapp to select which
- type-specific script to use. MMkkmmff..mmaapp is an awk script that
- performs pattern matching on the current directory to select
- a type-specific script. This file has already been set up
- to handle most of the system areas, but if you add a major
- new area of programs or libraries you'll probably have to
- add a new entry in mmkkmmff..mmaapp. If mmkkmmff finds a script
- mmkkmmff..llooccaall in the current directory, then mmkkmmff uses it
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 8
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- instead of the one that would have been selected by
- mmkkmmff..mmaapp. Similarly, if there is a file MMaakkeeffiillee..pprroottoo in
- the current directory, it is used instead of the default
- prototype makefile.
-
- You can reconfigure the way that mmkkmmff works by placing a
- file ..mmkkmmff in your home directory. If this file exists,
- mmkkmmff will source it as a shell script just after doing its
- initialization. You can use this feature to set up a
- private map for yourself and change other internal features
- of mmkkmmff. For more details on how this works, read the top-
- level mmkkmmff script.
-
-
- CCUURRRREENNTT TTYYPPEESS
- Although the list of available type-dependent scripts will
- probably grow and change faster than this man page can be
- updated, here are the types that were available as of the
- last time the man page was updated. To force mmkkmmff to use a
- particular type (e.g., ``library'' instead of ``command''),
- use either a mmkkmmff..llooccaall or a MMaakkeeffiillee..pprroottoo, as described in
- ``HOW MKMF WORKS,'' above.
-
- ccoommmmaanndd This type is for command directories where all
- of the files related to the command are
- together in a single directory and its ..mmdd
- subdirectories. It is the default type used
- by mmkkmmff for directories not explicitly listed
- in mmkkmmff..mmaapp. MMaakkeeffiillee will compile and link
- the command into _t_m..mmdd//_n_a_m_e, where _t_m is the
- name of a target machine and _n_a_m_e is the name
- of the directory containing MMaakkeeffiillee (the
- directory name and command name are assumed to
- be the same). MMaakkeeffiillee will install the com-
- mand into the appropriate system directory
- (see the mmkkmmff scripts for details on where
- this is). During the conversion of Sprite to
- the new C library, this type of directory is
- actually ccoommmmaanndd22, but it will revert to ccoomm--
- mmaanndd when the conversion is finished.
-
- bbiiggccmmdd This type is for commands whose source files
- have been partitioned into multiple subdirec-
- tories, with one MMaakkeeffiillee for each subdirec-
- tory. The MMaakkeeffiillees in the subdirectories are
- of type bbiiggccmmdd, and the MMaakkeeffiillee of the parent
- is of type bbiiggccmmddttoopp. Each bbiiggccmmdd subdirec-
- tory contains _t_m..mmdd subdirectories, which con-
- tain object files compiled from that subdirec-
- tory plus a file lliinnkkeedd..oo, which consists of
- all the object files from that subdirectory
- linked together.
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 9
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- bbiiggccmmddttoopp This type is used for a command source direc-
- tory that contains one or more subdirectories
- of type bbiiggccmmdd. The MMaakkeeffiillee in this direc-
- tory will cause all the children directories
- to be re-made, plus it will regenerate the
- file _t_m..mmdd//_n_a_m_e, where _t_m is the name of a
- target machine and _n_a_m_e is the name of the
- bbiiggccmmddttoopp directory. A special target qquuiicckk
- is also available in bbiiggccmmddttoopp directories:
- it will relink _t_m..mmdd//_n_a_m_e using the existing
- lliinnkkeedd..oo files from the children, without
- passing through all the subdirectories to
- remake there.
-
- lliibbrraarryy This type is for directories containing all of
- the files related to a particular library.
- MMaakkeeffiillee will compile all the files in the
- directory and assemble them into an archive
- file named _t_m..mmdd//lliibb_n_a_m_e..aa,, wwhheerree _t_m is the
- name of a target machine and _n_a_m_e is the name
- of the directory containing MMaakkeeffiillee (the
- directory name and library name are assumed to
- be the same). MMaakkeeffiillee will install the
- library and its headers and lint library.
-
- bbiigglliibb This type is for libraries with many source
- files, such as the C library. The library's
- sources are assumed to be split over many sub-
- directories, with one MMaakkeeffiillee for each sub-
- directory. The MMaakkeeffiillees in the subdirec-
- tories are of type bbiigglliibb, and the MMaakkeeffiillee of
- the parent is of type bbiigglliibbttoopp. Compiled
- files will be archived together into the file
- ....//_t_m..mmdd//lliibb_n_a_m_e..aa (relative to the subdirec-
- tories containing the bbiigglliibb MMaakkeeffiillees), where
- _t_m is the name of a target machine and _n_a_m_e is
- the name of the top-level directory (the
- directory containing the bbiigglliibb directories is
- assumed to have the same name as the overall
- library).
-
- bbiigglliiggttoopp This is the type of a directory that contains
- one or more bbiigglliibb subdirectories. The
- MMaakkeeffiillee in this directory will pass most of
- the standard targets along to its children
- directories. The installation targets (such
- as iinnssttaallll and iinnssttaalllllliinntt) should be invoked
- in this directory. A special target
- iinnssttaallllqquuiicckk is also available in bbiigglliibbttoopp
- directories: it will install the standard
- version of the library without cycling through
- all of the subdirectories to give each of them
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 10
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- a chance to recompile.
-
- kkeerrnneell This type is used in the directories that hold
- the major modules of the Sprite kernel.
-
- hhddrrss This type is used for directories that hold
- nothing but ``.h'' files for the standard
- library. The only thing you can do with ppmmaakkee
- is to install the header files; the default
- target does this, as does ppmmaakkee iinnssttaallll. In
- addition, ppmmaakkee rreeccuurrssiivvee will install header
- files in this directory and all of its sub-
- directories (this is only useful for header
- directories that contain more header direc-
- tories as subdirectories).
-
- ttoopp This is a general-purpose type for directories
- that don't have anything interesting in them-
- selves, but have child directories that do
- contain interesting things. When ppmmaakkee is run
- in such a directory, the MMaakkeeffiillee will simply
- pass all the standard targets down to each of
- its child directories in turn. This type of
- MMaakkeeffiillee is used, for example, in the top-
- level directory of a bbiigglliibb tree, or in a
- top-level commands directory, each of whose
- children is of type ccoommmmaanndd.
-
-
- LLOOCCAALL..MMKK VVAARRIIAABBLLEESS
- The following list describes some of the variables that you
- may wish to use, augment (using ``+=''), or override in
- llooccaall..mmkk files. This is just a list of the most commonly-
- used variables. For other possibilities, read the
- makefiles.
-
- AAFFLLAAGGSS Flags passed to the assembler. You may
- wish to augment this in llooccaall..mmkk.
-
- CCFFLLAAGGSS Flags passed to the C compiler. You may
- wish to augment this in llooccaall..mmkk, for
- example to define certain compiler
- switches. Or, you can override the value
- in MMaakkeeffiillee with something completely dif-
- ferent.
-
- CCLLEEAANNOOBBJJSS A list of object files and other things to
- delete as part of ppmmaakkee cclleeaann or ppmmaakkee
- ttiiddyy.
-
- HHDDRRSS A list of all the locally-defined ``.h''
- files (both machine-dependent and
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 11
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- machine-independent) used to compile this
- module.
-
- IINNSSTTAALLLLDDIIRR The base directory in which a program gets
- installed. MMkkmmff will add a machine-
- dependent suffix onto this, depending on
- the particular machine being compiled for
- (see the makefiles for more details on
- this).
-
- IINNSSTTAALLLLFFLLAAGGSS Flags passed to uuppddaattee when the module is
- installed. You may wish to add extra
- flags, like --mm 44775555 to make a program
- set-user-id.
-
- OOBBJJSS A list of all the object files used to
- link together this module. These files
- should always be in a machine-dependent
- directory.
-
- SSRRCCSS A list of all the source files (both
- machine-dependent and machine-independent)
- that comprise the module's version for the
- current target machine.
-
- SSUUBBDDIIRRSS A list of all the subdirectories of this
- directory, except those of type _t_m..mmdd).
- Is usually only available in top-level
- Makefiles, like those in directories of
- type ttoopp, bbiiggccmmddttoopp, or bbiigglliibbttoopp. This
- variable determines where to invoke recur-
- sive sub-makes.
-
- TTMM The name of the current target machine.
- Normally this is specified on the command
- line or defaulted in MMaakkeeffiillee, so you
- shouldn't modify it.
-
-
- LLOOCCAALL..MMKK EEXXAAMMPPLLEESS
- The normal structure for a llooccaall..mmkk file is for it to set up
- or modify a few variables, include the sysmakefile, and then
- add new targets or extend targets defined by the
- sysmakefile. For example, here is a simple llooccaall..mmkk that
- defines some additional compiler variables (by adding to
- CCFFLLAAGGSS) and uses an extra library:
-
- CCFFLLAAGGSS ++== --DDNNAAMMEE==tteessttPPrroogg
- LLIIBBSS ++== --llmm --XX1111
- ##iinncclluuddee <<$$((SSYYSSMMAAKKEEFFIILLEE))>>
-
- Or, below is a llooccaall..mmkk that generates an additional C file
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 12
-
-
-
-
-
-
- MKMF User Commands MKMF
-
-
-
- from a template. Since the file may not have existed when
- mmkkmmff was run, it must be added to the SSRRCCSS and OOBBJJSS vari-
- ables generated by mmkkmmff. In addition, when this program is
- installed (using the uuppddaattee command), it is marked at set-
- user-id (mode 4755):
-
- SSRRCCSS ++== aauuttoo..cc
- OOBBJJSS ++== $$((TTMM))..mmdd//aauuttoo..oo
- IINNSSTTAALLLLFFLLAAGGSS ++== --mm 44775555
-
- ##iinncclluuddee <<$$((SSYYSSMMAAKKEEFFIILLEE))>>
-
- aauuttoo..cc:: tteemmppllaattee pprroogg
- pprroogg tteemmppllaattee >> aauuttoo..cc
-
- The reason for adding new targets after including the
- sysmakefile is to allow the sysmakefile to define the first
- target, which is the default that will be made if ppmmaakkee is
- invoked with no arguments. If, on the other hand, you want
- to change the default target, then you can define the
- default target before including the sysmakefile.
-
- As a third example, consider a program that uses non-
- standard header files. It would have a local.mk that looks
- something like
-
- ##iinncclluuddee <<$$((SSYYSSMMAAKKEEFFIILLEE))>>
-
- ..PPAATTHH..hh :: //sspprriittee//lliibb//iinncclluuddee..ssppeecciiaall
-
- Notice that the ..PPAATTHH..hh line comes after the sysmakefile is
- included.
-
-
- SSEEEE AALLSSOO
- pmake, sed, ex
-
-
- KKEEYYWWOORRDDSS
- make, Makefile, prototype
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 13
-
-
-
-